Memory devices including semiconductor elements are broadly classified into two categories: volatile memory devices that cannot hold stored data when not powered, and nonvolatile memory devices that hold stored data even when not powered.
A typical example of volatile memory devices includes a DRAM (dynamic random access memory). A DRAM stores data in such a manner that a transistor included in a memory element is selected to store electric charge in a capacitor.
On the above-described principle, when data is read from a DRAM, charge in a capacitor is lost; thus, another writing operation is necessary every time data is read out. Moreover, since leakage current (off-state current) or the like flows between a source and a drain of a transistor included in a memory element when the transistor is in an off state, charge flows into or out even if the transistor is not selected, which makes a data holding period short. For this reason, another writing operation (refresh operation) is necessary at predetermined intervals, and it is difficult to sufficiently reduce power consumption. Furthermore, since stored data is lost when no power is supplied, an additional memory device using a magnetic material or an optical material is needed in order to hold the data for a long time.
Another example of volatile memory devices includes an SRAM (static random access memory). An SRAM retains stored data by using a circuit such as a flip-flop and thus does not need refresh operation. This means that an SRAM has an advantage over a DRAM. However, cost per storage capacity is increased because a circuit such as a flip-flop is used. Moreover, an SRAM is no different from a DRAM, in that stored data is lost when no power is supplied.
A typical example of non-volatile memory devices includes a flash memory. A flash memory includes a floating gate between a gate electrode and a channel formation region in a transistor and stores data by holding electric charge in the floating gate. Therefore, a flash memory has advantages in that the data holding period is extremely long (almost permanent) and refresh operation which is necessary for volatile memory devices is not needed (e.g., see Patent Document 1).
However, a gate insulating layer included in a memory element deteriorates by tunneling current generated at the time of a writing operation, so that the memory element fails to function because of a numerous number of writing operations. In order to avoid this problem, a method in which the number of writing operations for memory elements is equalized is employed, for example. However, complicated supplemental circuits are additionally needed to realize this method. Moreover, this method does not resolve the fundamental problem of lifetime. In other words, a flash memory is not suitable for applications in which data is frequently rewritten.
In addition, high voltage is needed for injecting electric charge into a floating gate or removing the electric charge therefrom, and a circuit therefor is required. Further, it takes a relatively long time to inject or remove electric charge, and it is not easy to perform writing and erasing at higher speed.